export default function (context) {
    // console.log(context.store.state.breadcrumbs)
    // console.log(context.route.path)
    var i = context.route.path
    console.log(i)
    if(i == "/"){
        context.store.state.breadcrumbs = [{name:"首页",url:"/"}]
    }
    if(i == "/equity"){
        context.store.state.breadcrumbs = [{name:"首页",url:"/"},{name:"私募股权",url:"/about"}]
    }
    if(i == "/trust"){
        context.store.state.breadcrumbs = [{name:"首页",url:"/"},{name:"信托资管",url:"/trust"}]
    }
    if(i == "/fund"){
        context.store.state.breadcrumbs = [{name:"首页",url:"/"},{name:"契约基金",url:"/fund"}]
    }
    if(i == "/research"){
        context.store.state.breadcrumbs = [{name:"首页",url:"/"},{name:"天沁投研",url:"/research"}]
    }
    if(i == "/advisory"){
        context.store.state.breadcrumbs = [{name:"首页",url:"/"},{name:"热点资讯",url:"/advisory"}]
    }
    if(i == "/about"){
        context.store.state.breadcrumbs = [{name:"首页",url:"/"},{name:"关于我们",url:"/about"}]
    }
    if(i.indexOf("newslist") != -1){
        if(context.store.state.breadcrumbs.length == 3){
            context.store.state.breadcrumbs.pop();
        }      
        context.store.state.breadcrumbs.push({name:"文章列表页",url:"/newslist"});
    }
    if(i.indexOf("product") != -1){
        if(context.store.state.breadcrumbs.length == 3){
            context.store.state.breadcrumbs.pop();
        }
        context.store.state.breadcrumbs.push({name:"产品详情",url:i});
    }
    if(i.indexOf("post") != -1 || i.indexOf("school") != -1 || i.indexOf("web") != -1 ){
        if(context.store.state.breadcrumbs.length == 3){
            context.store.state.breadcrumbs.pop();
        }      
        context.store.state.breadcrumbs.push({name:"正文",url:i});
    }
    if((i.indexOf("post") != -1 || i.indexOf("school") != -1 || i.indexOf("web") != -1 ) && i.indexOf("newslist") != -1){
        console.log(111)
        if(context.store.state.breadcrumbs.length == 4){
            context.store.state.breadcrumbs.pop();
        }      
        context.store.state.breadcrumbs.push({name:"正文",url:i});
    }
    if(i.indexOf("/search") != -1){
        if(context.store.state.breadcrumbs.length == 3){
            context.store.state.breadcrumbs.pop();
        }      
        context.store.state.breadcrumbs.push({name:"搜索详情",url:i});
    }
    if(i.indexOf("/column") != -1){
        if(context.store.state.breadcrumbs.length == 3){
            context.store.state.breadcrumbs.pop();
        }      
        context.store.state.breadcrumbs.push({name:"新闻列表",url:i});
    }
    if(i.indexOf("/gonggao") != -1){
        context.store.state.breadcrumbs = [{name:"首页",url:"/"},{name:"产品公告",url:i}]
    }
  }